<template>
  <div class="user">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="username" label="用户名"> </el-table-column>
      <el-table-column prop="realname" label="姓名"> </el-table-column>
      <el-table-column prop="telephone" label="联系电话"> </el-table-column>
      <el-table-column prop="gender" label="性别"> </el-table-column>
      <el-table-column label="出生日期" width="160" align="center">
        <template v-slot="scope">
          {{ scope.row.birth | fmtDate }}
        </template>
      </el-table-column>
      <el-table-column prop="registerTime" label="注册时间"> </el-table-column>
      <el-table-column prop="status" label="状态"> </el-table-column>
      <el-table-column prop="userFace" label="头像"> </el-table-column>
      <el-table-column prop="address" label="地址"> </el-table-column>
    </el-table>
  </div>
</template>
<script>
import { mapState, mapActions } from "vuex";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  computed: {
    ...mapState("user", ["msg"]),
  },
  methods: {
    ...mapActions("user", ["findAllUser"]),
  },
  created() {
    this.findAllUser().then((res) => {
      this.tableData = res.data;
    });
  },
};
</script>
<style lang="less" scoped>
</style>